package start.spring.basic.job.feignclient;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import start.spring.basic.interceptor.FeignRequestInterceptor;
import start.spring.basic.log.LogConstant;
import start.spring.basic.response.ResponseData;

/**
 * 
 * ****************************************************************************
 * 本应用包主动调用interface接口
 * interface与当前应用包注册到同一个微服务中心时不需要配置feign.url-interface，否则需要配置
 * FeignRequestInterceptor用于添加调用方的公共信息
 *
 * @author(作者)：xuyongyun	
 * @date(创建日期)：2023年2月11日
 ******************************************************************************
 */
@FeignClient(
		value = "exinterface",
		contextId = "InterfaceVersionFeignClient",
		path = "/exinterface",
		url = "${feign.url-interface:}",
		configuration = FeignRequestInterceptor.class
		)
public interface InterfaceVersionFeignClient {
	
	@RequestMapping(value="/resource/test/version",method=RequestMethod.GET)
	public ResponseData<String> testVersion(@RequestHeader(LogConstant.REQUEST_KEY_TRACEID) String traceId);

}
